package com.we.connect.weconnect.utils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class UserUtils {

    public static Object getSysUser(HttpServletRequest request, String flag){
        HttpSession session = request.getSession(true);
        return session.getAttribute(flag);
    }

    public static void setSysUser(HttpServletRequest request, String flag, Object o){
        HttpSession session = request.getSession(true);
        session.setAttribute(flag, o);
    }

    public static void delSysUser(HttpServletRequest request, String flag){
        HttpSession session = request.getSession(true);
        session.setAttribute(flag, null);
    }
}
